package sf_errors

// 财务模块
const (
	errorFinanceDefault             = 209000 + iota
	ErrorBalancePayNotAllowed       // 209001 余额支付没有权限
	ErrorBalanceNotEnough           // 209002 余额不足
	ErrInsufficientRefundableAmount // 209003 可退金额不足
	ErrOrderNotHolding              // 209004 订单不处于挂在中
	ErrOrderChangeTypeFailed        // 209005 订单类型不支持
	ErrOrderPayHistoryNotFound      // 209006 未找到支付记录
	ErrorVerificationNotfound       // 未找到该核销单
	ErrorVerificationStatus         // 和核销单状态不符合当前操作
	ErrorSysTemBalanceNotEnough     //209009支付出现问题，请联系管理员吧
)

func registerFinanceErrors() {
	errorMessageMap[ErrorBalancePayNotAllowed] = "ErrorBalancePayNotAllowed"             // 209001 余额支付没有权限
	errorMessageMap[ErrorBalanceNotEnough] = "ErrorBalanceNotEnough"                     // 209002 余额不足
	errorMessageMap[ErrInsufficientRefundableAmount] = "ErrInsufficientRefundableAmount" // 209003 可退金额不足
	errorMessageMap[ErrOrderNotHolding] = "ErrOrderNotHolding"                           // 209004 订单不处于挂在中
	errorMessageMap[ErrOrderChangeTypeFailed] = "ErrOrderChangeTypeFailed"               // 209005 订单类型不支持
	errorMessageMap[ErrOrderPayHistoryNotFound] = "ErrOrderPayHistoryNotFound"           // 209006 未找到支付记录
	errorMessageMap[ErrorVerificationNotfound] = "ErrorVerificationNotfound"             // 未找到该核销单
	errorMessageMap[ErrorVerificationStatus] = "ErrorVerificationStatus"                 // 和核销单状态不符合当前操作
	errorMessageMap[ErrorSysTemBalanceNotEnough] = "ErrorSysTemBalanceNotEnough"         //209009支付出现问题，请联系管理员吧
}
